//
// Created by 11510 on 2024/7/17.
//

#ifndef INC_02_EVENT_PASS_MAINWINDOW_H
#define INC_02_EVENT_PASS_MAINWINDOW_H

#include <QMainWindow>
#include "Out.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow {
Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);

    ~MainWindow() override;

    bool event(QEvent *e) override {
        if (e->type() == QEvent::MouseButtonRelease) {
            qDebug() << "event object = " << this->objectName();
        }
        return QMainWindow::event(e);
    }

    void mouseReleaseEvent(QMouseEvent *ev) override {
        qDebug() << "event handler object = " << this->objectName();
    }

private:
    Ui::MainWindow *ui;
    Out* out;
    In* in;
    Mid* mid;
};


#endif //INC_02_EVENT_PASS_MAINWINDOW_H
